home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / pc / files / mac / chess_hc.hqx / Chess Stack1.0 / ChessStack V1.0 / background_2581.txt < prev    next >
Text File  |  1988-06-28  |  27KB  |  1,236 lines

  1. -- background: 2581 from stack: in.0
  2. -- bmap block id: 2098
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: Chess
  6. ----- HyperTalk script -----
  7. on idle
  8.   put empty into theString
  9.   if SPortHasChar(1) is true then
  10.     put recvUpTo(1,return,48,false,false) into theString
  11.   end if
  12.   if the length of theString > 1 then
  13.     put theString after card field "inField"
  14.     click at 112,141
  15.     mimic theString
  16.   end if
  17. end idle
  18.  
  19. on mimic theString
  20.   global cntlC3,connectStatus,cC1
  21.   put word 1 of theString into request
  22.   if request = "Move" then
  23.     put word 2 of theString into piece
  24.     delete first character of piece
  25.     delete last character of piece
  26.     put piece into field "Game Info"
  27.     play harpsichord tempo 200 "cq e cq"
  28.     put word 3 of theString into x
  29.     put word 4 of theString into y
  30.     set the loc of card button piece to x,y
  31.     exit mimic
  32.   end if
  33.   if request = "Msg" then
  34.     put "Msg Rcvd..." into field "Game Info"
  35.     play harpsichord tempo 200 "eq c eq"
  36.     exit mimic
  37.   end if
  38.   if request contains "***" then
  39.     put word 2 of theString into piece
  40.     if piece = "CONNECTED" then
  41.       sendSPort 1,false,cC1 & return
  42.       sendSPort 1,false,"ECHO OFF" & return
  43.       sendSPort 1,false,cC1 & return
  44.       sendSPort 1,false,"CONVERSE" & return
  45.       put true into connectStatus
  46.       put "Connected.." into field "Game Info"
  47.       hide card button "Conn" of card "Main"
  48.       show card button "Disc" of card "Main"
  49.       exit mimic
  50.     end if
  51.     if piece contains "DISCONNECTED" then
  52.       sendSPort 1,false,cntlC3 & "ECHO ON" & return
  53.       put "Disconnected.." into field "Game Info"
  54.       put false into connectStatus
  55.       show card button "Conn" of card "Main"
  56.       hide card button "Disc" of card "Main"
  57.       exit mimic
  58.     end if
  59.   end if
  60.   if request contains "cmd:" then
  61.     exit mimic
  62.   end if
  63.   if request contains "ECHO" then
  64.     exit mimic
  65.   end if
  66.   if connectStatus is true then
  67.     put "Rcv Error..." into field "Game Info"
  68.     play harpsichord tempo 200 "cq c cq"
  69.   end if
  70. end mimic
  71.  
  72.  
  73. on centerPiece
  74.   put item 1 of the loc of the target into x
  75.   put item 2 of the loc of the target into y
  76.   if x > 127 and x < 463
  77.   then
  78.   put (((x-127) div 42) * 42)+127+21 into x
  79.   put (((y-1) div 42) * 42)+1+21 into y
  80.   set the loc of the target to x,y
  81. else
  82. end if
  83. put word 3 of name of the target into MovePiece
  84. put "Move" && MovePiece && x && y into MoveText
  85. put MoveText into card field "outfield"
  86. play "click"
  87. repeat while the sound is not "done"
  88. end repeat
  89. sendMove MoveText
  90. end centerPiece
  91.  
  92. on sendMove MoveText
  93.   sendSPort 1,false,MoveText & return
  94. end sendMove
  95.  
  96.  
  97.  
  98.  
  99.  
  100. -- part 2 (button)
  101. -- low flags: 00
  102. -- high flags: 0001
  103. -- rect: left=127 top=1 right=44 bottom=170
  104. -- title width / last selected line: 0
  105. -- icon id / first selected line: 0 / 0
  106. -- text alignment: 1
  107. -- font id: 0
  108. -- text size: 12
  109. -- style flags: 0
  110. -- line height: 16
  111. -- part name: New Button
  112.  
  113.  
  114. -- part 3 (button)
  115. -- low flags: 00
  116. -- high flags: 0000
  117. -- rect: left=169 top=1 right=44 bottom=212
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: New Button
  126. ----- HyperTalk script -----
  127. on mouseUp
  128.   beep
  129. end mouseUp
  130.  
  131.  
  132.  
  133. -- part 4 (button)
  134. -- low flags: 00
  135. -- high flags: 0001
  136. -- rect: left=211 top=1 right=44 bottom=254
  137. -- title width / last selected line: 0
  138. -- icon id / first selected line: 0 / 0
  139. -- text alignment: 1
  140. -- font id: 0
  141. -- text size: 12
  142. -- style flags: 0
  143. -- line height: 16
  144. -- part name: New Button
  145.  
  146.  
  147. -- part 5 (button)
  148. -- low flags: 00
  149. -- high flags: 0000
  150. -- rect: left=253 top=1 right=44 bottom=296
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 0 / 0
  153. -- text alignment: 1
  154. -- font id: 0
  155. -- text size: 12
  156. -- style flags: 0
  157. -- line height: 16
  158. -- part name: New Button
  159.  
  160.  
  161. -- part 6 (button)
  162. -- low flags: 00
  163. -- high flags: 0001
  164. -- rect: left=295 top=1 right=44 bottom=338
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 1
  168. -- font id: 0
  169. -- text size: 12
  170. -- style flags: 0
  171. -- line height: 16
  172. -- part name: New Button
  173.  
  174.  
  175. -- part 7 (button)
  176. -- low flags: 00
  177. -- high flags: 0000
  178. -- rect: left=337 top=1 right=44 bottom=380
  179. -- title width / last selected line: 0
  180. -- icon id / first selected line: 0 / 0
  181. -- text alignment: 1
  182. -- font id: 0
  183. -- text size: 12
  184. -- style flags: 0
  185. -- line height: 16
  186. -- part name: New Button
  187.  
  188.  
  189. -- part 8 (button)
  190. -- low flags: 00
  191. -- high flags: 0001
  192. -- rect: left=379 top=1 right=44 bottom=422
  193. -- title width / last selected line: 0
  194. -- icon id / first selected line: 0 / 0
  195. -- text alignment: 1
  196. -- font id: 0
  197. -- text size: 12
  198. -- style flags: 0
  199. -- line height: 16
  200. -- part name: New Button
  201.  
  202.  
  203. -- part 9 (button)
  204. -- low flags: 00
  205. -- high flags: 0000
  206. -- rect: left=421 top=1 right=44 bottom=464
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 1
  210. -- font id: 0
  211. -- text size: 12
  212. -- style flags: 0
  213. -- line height: 16
  214. -- part name: New Button
  215.  
  216.  
  217. -- part 10 (button)
  218. -- low flags: 00
  219. -- high flags: 0000
  220. -- rect: left=127 top=43 right=86 bottom=170
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 1
  224. -- font id: 0
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: New Button
  229.  
  230.  
  231. -- part 11 (button)
  232. -- low flags: 00
  233. -- high flags: 0001
  234. -- rect: left=169 top=43 right=86 bottom=212
  235. -- title width / last selected line: 0
  236. -- icon id / first selected line: 0 / 0
  237. -- text alignment: 1
  238. -- font id: 0
  239. -- text size: 12
  240. -- style flags: 0
  241. -- line height: 16
  242. -- part name: New Button
  243.  
  244.  
  245. -- part 12 (button)
  246. -- low flags: 00
  247. -- high flags: 0000
  248. -- rect: left=211 top=43 right=86 bottom=254
  249. -- title width / last selected line: 0
  250. -- icon id / first selected line: 0 / 0
  251. -- text alignment: 1
  252. -- font id: 0
  253. -- text size: 12
  254. -- style flags: 0
  255. -- line height: 16
  256. -- part name: New Button
  257.  
  258.  
  259. -- part 13 (button)
  260. -- low flags: 00
  261. -- high flags: 0001
  262. -- rect: left=253 top=43 right=86 bottom=296
  263. -- title width / last selected line: 0
  264. -- icon id / first selected line: 0 / 0
  265. -- text alignment: 1
  266. -- font id: 0
  267. -- text size: 12
  268. -- style flags: 0
  269. -- line height: 16
  270. -- part name: New Button
  271.  
  272.  
  273. -- part 14 (button)
  274. -- low flags: 00
  275. -- high flags: 0000
  276. -- rect: left=295 top=43 right=86 bottom=338
  277. -- title width / last selected line: 0
  278. -- icon id / first selected line: 0 / 0
  279. -- text alignment: 1
  280. -- font id: 0
  281. -- text size: 12
  282. -- style flags: 0
  283. -- line height: 16
  284. -- part name: New Button
  285.  
  286.  
  287. -- part 15 (button)
  288. -- low flags: 00
  289. -- high flags: 0001
  290. -- rect: left=337 top=43 right=86 bottom=380
  291. -- title width / last selected line: 0
  292. -- icon id / first selected line: 0 / 0
  293. -- text alignment: 1
  294. -- font id: 0
  295. -- text size: 12
  296. -- style flags: 0
  297. -- line height: 16
  298. -- part name: New Button
  299.  
  300.  
  301. -- part 16 (button)
  302. -- low flags: 00
  303. -- high flags: 0000
  304. -- rect: left=379 top=43 right=86 bottom=422
  305. -- title width / last selected line: 0
  306. -- icon id / first selected line: 0 / 0
  307. -- text alignment: 1
  308. -- font id: 0
  309. -- text size: 12
  310. -- style flags: 0
  311. -- line height: 16
  312. -- part name: New Button
  313.  
  314.  
  315. -- part 17 (button)
  316. -- low flags: 00
  317. -- high flags: 0001
  318. -- rect: left=421 top=43 right=86 bottom=464
  319. -- title width / last selected line: 0
  320. -- icon id / first selected line: 0 / 0
  321. -- text alignment: 1
  322. -- font id: 0
  323. -- text size: 12
  324. -- style flags: 0
  325. -- line height: 16
  326. -- part name: New Button
  327.  
  328.  
  329. -- part 18 (button)
  330. -- low flags: 00
  331. -- high flags: 0001
  332. -- rect: left=127 top=85 right=128 bottom=170
  333. -- title width / last selected line: 0
  334. -- icon id / first selected line: 0 / 0
  335. -- text alignment: 1
  336. -- font id: 0
  337. -- text size: 12
  338. -- style flags: 0
  339. -- line height: 16
  340. -- part name: New Button
  341.  
  342.  
  343. -- part 19 (button)
  344. -- low flags: 00
  345. -- high flags: 0000
  346. -- rect: left=169 top=85 right=128 bottom=212
  347. -- title width / last selected line: 0
  348. -- icon id / first selected line: 0 / 0
  349. -- text alignment: 1
  350. -- font id: 0
  351. -- text size: 12
  352. -- style flags: 0
  353. -- line height: 16
  354. -- part name: New Button
  355.  
  356.  
  357. -- part 20 (button)
  358. -- low flags: 00
  359. -- high flags: 0001
  360. -- rect: left=211 top=85 right=128 bottom=254
  361. -- title width / last selected line: 0
  362. -- icon id / first selected line: 0 / 0
  363. -- text alignment: 1
  364. -- font id: 0
  365. -- text size: 12
  366. -- style flags: 0
  367. -- line height: 16
  368. -- part name: New Button
  369.  
  370.  
  371. -- part 21 (button)
  372. -- low flags: 00
  373. -- high flags: 0000
  374. -- rect: left=253 top=85 right=128 bottom=296
  375. -- title width / last selected line: 0
  376. -- icon id / first selected line: 0 / 0
  377. -- text alignment: 1
  378. -- font id: 0
  379. -- text size: 12
  380. -- style flags: 0
  381. -- line height: 16
  382. -- part name: New Button
  383.  
  384.  
  385. -- part 22 (button)
  386. -- low flags: 00
  387. -- high flags: 0001
  388. -- rect: left=295 top=85 right=128 bottom=338
  389. -- title width / last selected line: 0
  390. -- icon id / first selected line: 0 / 0
  391. -- text alignment: 1
  392. -- font id: 0
  393. -- text size: 12
  394. -- style flags: 0
  395. -- line height: 16
  396. -- part name: New Button
  397.  
  398.  
  399. -- part 23 (button)
  400. -- low flags: 00
  401. -- high flags: 0000
  402. -- rect: left=337 top=85 right=128 bottom=380
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 0 / 0
  405. -- text alignment: 1
  406. -- font id: 0
  407. -- text size: 12
  408. -- style flags: 0
  409. -- line height: 16
  410. -- part name: New Button
  411.  
  412.  
  413. -- part 24 (button)
  414. -- low flags: 00
  415. -- high flags: 0001
  416. -- rect: left=379 top=85 right=128 bottom=422
  417. -- title width / last selected line: 0
  418. -- icon id / first selected line: 0 / 0
  419. -- text alignment: 1
  420. -- font id: 0
  421. -- text size: 12
  422. -- style flags: 0
  423. -- line height: 16
  424. -- part name: New Button
  425.  
  426.  
  427. -- part 25 (button)
  428. -- low flags: 00
  429. -- high flags: 0000
  430. -- rect: left=421 top=85 right=128 bottom=464
  431. -- title width / last selected line: 0
  432. -- icon id / first selected line: 0 / 0
  433. -- text alignment: 1
  434. -- font id: 0
  435. -- text size: 12
  436. -- style flags: 0
  437. -- line height: 16
  438. -- part name: New Button
  439.  
  440.  
  441. -- part 26 (button)
  442. -- low flags: 00
  443. -- high flags: 0000
  444. -- rect: left=127 top=127 right=170 bottom=170
  445. -- title width / last selected line: 0
  446. -- icon id / first selected line: 0 / 0
  447. -- text alignment: 1
  448. -- font id: 0
  449. -- text size: 12
  450. -- style flags: 0
  451. -- line height: 16
  452. -- part name: New Button
  453.  
  454.  
  455. -- part 27 (button)
  456. -- low flags: 00
  457. -- high flags: 0001
  458. -- rect: left=169 top=127 right=170 bottom=212
  459. -- title width / last selected line: 0
  460. -- icon id / first selected line: 0 / 0
  461. -- text alignment: 1
  462. -- font id: 0
  463. -- text size: 12
  464. -- style flags: 0
  465. -- line height: 16
  466. -- part name: New Button
  467.  
  468.  
  469. -- part 28 (button)
  470. -- low flags: 00
  471. -- high flags: 0000
  472. -- rect: left=211 top=127 right=170 bottom=254
  473. -- title width / last selected line: 0
  474. -- icon id / first selected line: 0 / 0
  475. -- text alignment: 1
  476. -- font id: 0
  477. -- text size: 12
  478. -- style flags: 0
  479. -- line height: 16
  480. -- part name: New Button
  481.  
  482.  
  483. -- part 29 (button)
  484. -- low flags: 00
  485. -- high flags: 0001
  486. -- rect: left=253 top=127 right=170 bottom=296
  487. -- title width / last selected line: 0
  488. -- icon id / first selected line: 0 / 0
  489. -- text alignment: 1
  490. -- font id: 0
  491. -- text size: 12
  492. -- style flags: 0
  493. -- line height: 16
  494. -- part name: New Button
  495.  
  496.  
  497. -- part 30 (button)
  498. -- low flags: 00
  499. -- high flags: 0000
  500. -- rect: left=295 top=127 right=171 bottom=338
  501. -- title width / last selected line: 0
  502. -- icon id / first selected line: 0 / 0
  503. -- text alignment: 1
  504. -- font id: 0
  505. -- text size: 12
  506. -- style flags: 0
  507. -- line height: 16
  508. -- part name: New Button
  509.  
  510.  
  511. -- part 31 (button)
  512. -- low flags: 00
  513. -- high flags: 0001
  514. -- rect: left=337 top=127 right=170 bottom=380
  515. -- title width / last selected line: 0
  516. -- icon id / first selected line: 0 / 0
  517. -- text alignment: 1
  518. -- font id: 0
  519. -- text size: 12
  520. -- style flags: 0
  521. -- line height: 16
  522. -- part name: New Button
  523.  
  524.  
  525. -- part 32 (button)
  526. -- low flags: 00
  527. -- high flags: 0000
  528. -- rect: left=379 top=127 right=170 bottom=422
  529. -- title width / last selected line: 0
  530. -- icon id / first selected line: 0 / 0
  531. -- text alignment: 1
  532. -- font id: 0
  533. -- text size: 12
  534. -- style flags: 0
  535. -- line height: 16
  536. -- part name: New Button
  537.  
  538.  
  539. -- part 33 (button)
  540. -- low flags: 00
  541. -- high flags: 0001
  542. -- rect: left=421 top=127 right=170 bottom=464
  543. -- title width / last selected line: 0
  544. -- icon id / first selected line: 0 / 0
  545. -- text alignment: 1
  546. -- font id: 0
  547. -- text size: 12
  548. -- style flags: 0
  549. -- line height: 16
  550. -- part name: New Button
  551.  
  552.  
  553. -- part 34 (button)
  554. -- low flags: 00
  555. -- high flags: 0001
  556. -- rect: left=127 top=169 right=212 bottom=170
  557. -- title width / last selected line: 0
  558. -- icon id / first selected line: 0 / 0
  559. -- text alignment: 1
  560. -- font id: 0
  561. -- text size: 12
  562. -- style flags: 0
  563. -- line height: 16
  564. -- part name: New Button
  565.  
  566.  
  567. -- part 35 (button)
  568. -- low flags: 00
  569. -- high flags: 0000
  570. -- rect: left=169 top=169 right=212 bottom=212
  571. -- title width / last selected line: 0
  572. -- icon id / first selected line: 0 / 0
  573. -- text alignment: 1
  574. -- font id: 0
  575. -- text size: 12
  576. -- style flags: 0
  577. -- line height: 16
  578. -- part name: New Button
  579.  
  580.  
  581. -- part 36 (button)
  582. -- low flags: 00
  583. -- high flags: 0001
  584. -- rect: left=211 top=169 right=212 bottom=254
  585. -- title width / last selected line: 0
  586. -- icon id / first selected line: 0 / 0
  587. -- text alignment: 1
  588. -- font id: 0
  589. -- text size: 12
  590. -- style flags: 0
  591. -- line height: 16
  592. -- part name: New Button
  593.  
  594.  
  595. -- part 37 (button)
  596. -- low flags: 00
  597. -- high flags: 0000
  598. -- rect: left=253 top=169 right=212 bottom=296
  599. -- title width / last selected line: 0
  600. -- icon id / first selected line: 0 / 0
  601. -- text alignment: 1
  602. -- font id: 0
  603. -- text size: 12
  604. -- style flags: 0
  605. -- line height: 16
  606. -- part name: New Button
  607.  
  608.  
  609. -- part 38 (button)
  610. -- low flags: 00
  611. -- high flags: 0001
  612. -- rect: left=295 top=169 right=212 bottom=338
  613. -- title width / last selected line: 0
  614. -- icon id / first selected line: 0 / 0
  615. -- text alignment: 1
  616. -- font id: 0
  617. -- text size: 12
  618. -- style flags: 0
  619. -- line height: 16
  620. -- part name: New Button
  621.  
  622.  
  623. -- part 39 (button)
  624. -- low flags: 00
  625. -- high flags: 0000
  626. -- rect: left=337 top=169 right=212 bottom=380
  627. -- title width / last selected line: 0
  628. -- icon id / first selected line: 0 / 0
  629. -- text alignment: 1
  630. -- font id: 0
  631. -- text size: 12
  632. -- style flags: 0
  633. -- line height: 16
  634. -- part name: New Button
  635.  
  636.  
  637. -- part 40 (button)
  638. -- low flags: 00
  639. -- high flags: 0001
  640. -- rect: left=379 top=169 right=212 bottom=422
  641. -- title width / last selected line: 0
  642. -- icon id / first selected line: 0 / 0
  643. -- text alignment: 1
  644. -- font id: 0
  645. -- text size: 12
  646. -- style flags: 0
  647. -- line height: 16
  648. -- part name: New Button
  649.  
  650.  
  651. -- part 41 (button)
  652. -- low flags: 00
  653. -- high flags: 0000
  654. -- rect: left=421 top=169 right=212 bottom=464
  655. -- title width / last selected line: 0
  656. -- icon id / first selected line: 0 / 0
  657. -- text alignment: 1
  658. -- font id: 0
  659. -- text size: 12
  660. -- style flags: 0
  661. -- line height: 16
  662. -- part name: New Button
  663.  
  664.  
  665. -- part 42 (button)
  666. -- low flags: 00
  667. -- high flags: 0000
  668. -- rect: left=127 top=211 right=254 bottom=170
  669. -- title width / last selected line: 0
  670. -- icon id / first selected line: 0 / 0
  671. -- text alignment: 1
  672. -- font id: 0
  673. -- text size: 12
  674. -- style flags: 0
  675. -- line height: 16
  676. -- part name: New Button
  677.  
  678.  
  679. -- part 43 (button)
  680. -- low flags: 00
  681. -- high flags: 0001
  682. -- rect: left=169 top=211 right=254 bottom=212
  683. -- title width / last selected line: 0
  684. -- icon id / first selected line: 0 / 0
  685. -- text alignment: 1
  686. -- font id: 0
  687. -- text size: 12
  688. -- style flags: 0
  689. -- line height: 16
  690. -- part name: New Button
  691.  
  692.  
  693. -- part 44 (button)
  694. -- low flags: 00
  695. -- high flags: 0000
  696. -- rect: left=211 top=211 right=254 bottom=254
  697. -- title width / last selected line: 0
  698. -- icon id / first selected line: 0 / 0
  699. -- text alignment: 1
  700. -- font id: 0
  701. -- text size: 12
  702. -- style flags: 0
  703. -- line height: 16
  704. -- part name: New Button
  705.  
  706.  
  707. -- part 45 (button)
  708. -- low flags: 00
  709. -- high flags: 0001
  710. -- rect: left=253 top=211 right=254 bottom=296
  711. -- title width / last selected line: 0
  712. -- icon id / first selected line: 0 / 0
  713. -- text alignment: 1
  714. -- font id: 0
  715. -- text size: 12
  716. -- style flags: 0
  717. -- line height: 16
  718. -- part name: New Button
  719.  
  720.  
  721. -- part 46 (button)
  722. -- low flags: 00
  723. -- high flags: 0000
  724. -- rect: left=295 top=211 right=254 bottom=338
  725. -- title width / last selected line: 0
  726. -- icon id / first selected line: 0 / 0
  727. -- text alignment: 1
  728. -- font id: 0
  729. -- text size: 12
  730. -- style flags: 0
  731. -- line height: 16
  732. -- part name: New Button
  733.  
  734.  
  735. -- part 47 (button)
  736. -- low flags: 00
  737. -- high flags: 0001
  738. -- rect: left=337 top=211 right=254 bottom=380
  739. -- title width / last selected line: 0
  740. -- icon id / first selected line: 0 / 0
  741. -- text alignment: 1
  742. -- font id: 0
  743. -- text size: 12
  744. -- style flags: 0
  745. -- line height: 16
  746. -- part name: New Button
  747.  
  748.  
  749. -- part 48 (button)
  750. -- low flags: 00
  751. -- high flags: 0000
  752. -- rect: left=379 top=211 right=254 bottom=422
  753. -- title width / last selected line: 0
  754. -- icon id / first selected line: 0 / 0
  755. -- text alignment: 1
  756. -- font id: 0
  757. -- text size: 12
  758. -- style flags: 0
  759. -- line height: 16
  760. -- part name: New Button
  761.  
  762.  
  763. -- part 49 (button)
  764. -- low flags: 00
  765. -- high flags: 0001
  766. -- rect: left=421 top=211 right=254 bottom=464
  767. -- title width / last selected line: 0
  768. -- icon id / first selected line: 0 / 0
  769. -- text alignment: 1
  770. -- font id: 0
  771. -- text size: 12
  772. -- style flags: 0
  773. -- line height: 16
  774. -- part name: New Button
  775.  
  776.  
  777. -- part 51 (button)
  778. -- low flags: 00
  779. -- high flags: 0001
  780. -- rect: left=127 top=253 right=296 bottom=170
  781. -- title width / last selected line: 0
  782. -- icon id / first selected line: 0 / 0
  783. -- text alignment: 1
  784. -- font id: 0
  785. -- text size: 12
  786. -- style flags: 0
  787. -- line height: 16
  788. -- part name: New Button
  789.  
  790.  
  791. -- part 52 (button)
  792. -- low flags: 00
  793. -- high flags: 0000
  794. -- rect: left=169 top=253 right=296 bottom=212
  795. -- title width / last selected line: 0
  796. -- icon id / first selected line: 0 / 0
  797. -- text alignment: 1
  798. -- font id: 0
  799. -- text size: 12
  800. -- style flags: 0
  801. -- line height: 16
  802. -- part name: New Button
  803.  
  804.  
  805. -- part 53 (button)
  806. -- low flags: 00
  807. -- high flags: 0001
  808. -- rect: left=211 top=253 right=296 bottom=254
  809. -- title width / last selected line: 0
  810. -- icon id / first selected line: 0 / 0
  811. -- text alignment: 1
  812. -- font id: 0
  813. -- text size: 12
  814. -- style flags: 0
  815. -- line height: 16
  816. -- part name: New Button
  817.  
  818.  
  819. -- part 54 (button)
  820. -- low flags: 00
  821. -- high flags: 0000
  822. -- rect: left=253 top=253 right=296 bottom=296
  823. -- title width / last selected line: 0
  824. -- icon id / first selected line: 0 / 0
  825. -- text alignment: 1
  826. -- font id: 0
  827. -- text size: 12
  828. -- style flags: 0
  829. -- line height: 16
  830. -- part name: New Button
  831.  
  832.  
  833. -- part 55 (button)
  834. -- low flags: 00
  835. -- high flags: 0001
  836. -- rect: left=295 top=253 right=296 bottom=338
  837. -- title width / last selected line: 0
  838. -- icon id / first selected line: 0 / 0
  839. -- text alignment: 1
  840. -- font id: 0
  841. -- text size: 12
  842. -- style flags: 0
  843. -- line height: 16
  844. -- part name: New Button
  845.  
  846.  
  847. -- part 56 (button)
  848. -- low flags: 00
  849. -- high flags: 0000
  850. -- rect: left=337 top=253 right=296 bottom=380
  851. -- title width / last selected line: 0
  852. -- icon id / first selected line: 0 / 0
  853. -- text alignment: 1
  854. -- font id: 0
  855. -- text size: 12
  856. -- style flags: 0
  857. -- line height: 16
  858. -- part name: New Button
  859.  
  860.  
  861. -- part 57 (button)
  862. -- low flags: 00
  863. -- high flags: 0001
  864. -- rect: left=379 top=253 right=296 bottom=422
  865. -- title width / last selected line: 0
  866. -- icon id / first selected line: 0 / 0
  867. -- text alignment: 1
  868. -- font id: 0
  869. -- text size: 12
  870. -- style flags: 0
  871. -- line height: 16
  872. -- part name: New Button
  873.  
  874.  
  875. -- part 58 (button)
  876. -- low flags: 00
  877. -- high flags: 0000
  878. -- rect: left=421 top=253 right=296 bottom=464
  879. -- title width / last selected line: 0
  880. -- icon id / first selected line: 0 / 0
  881. -- text alignment: 1
  882. -- font id: 0
  883. -- text size: 12
  884. -- style flags: 0
  885. -- line height: 16
  886. -- part name: New Button
  887.  
  888.  
  889. -- part 59 (button)
  890. -- low flags: 00
  891. -- high flags: 0000
  892. -- rect: left=127 top=295 right=338 bottom=170
  893. -- title width / last selected line: 0
  894. -- icon id / first selected line: 0 / 0
  895. -- text alignment: 1
  896. -- font id: 0
  897. -- text size: 12
  898. -- style flags: 0
  899. -- line height: 16
  900. -- part name: New Button
  901.  
  902.  
  903. -- part 60 (button)
  904. -- low flags: 00
  905. -- high flags: 0001
  906. -- rect: left=169 top=295 right=338 bottom=212
  907. -- title width / last selected line: 0
  908. -- icon id / first selected line: 0 / 0
  909. -- text alignment: 1
  910. -- font id: 0
  911. -- text size: 12
  912. -- style flags: 0
  913. -- line height: 16
  914. -- part name: New Button
  915.  
  916.  
  917. -- part 61 (button)
  918. -- low flags: 00
  919. -- high flags: 0000
  920. -- rect: left=211 top=295 right=338 bottom=254
  921. -- title width / last selected line: 0
  922. -- icon id / first selected line: 0 / 0
  923. -- text alignment: 1
  924. -- font id: 0
  925. -- text size: 12
  926. -- style flags: 0
  927. -- line height: 16
  928. -- part name: New Button
  929.  
  930.  
  931. -- part 62 (button)
  932. -- low flags: 00
  933. -- high flags: 0001
  934. -- rect: left=253 top=295 right=338 bottom=296
  935. -- title width / last selected line: 0
  936. -- icon id / first selected line: 0 / 0
  937. -- text alignment: 1
  938. -- font id: 0
  939. -- text size: 12
  940. -- style flags: 0
  941. -- line height: 16
  942. -- part name: New Button
  943.  
  944.  
  945. -- part 63 (button)
  946. -- low flags: 00
  947. -- high flags: 0000
  948. -- rect: left=295 top=295 right=338 bottom=338
  949. -- title width / last selected line: 0
  950. -- icon id / first selected line: 0 / 0
  951. -- text alignment: 1
  952. -- font id: 0
  953. -- text size: 12
  954. -- style flags: 0
  955. -- line height: 16
  956. -- part name: New Button
  957.  
  958.  
  959. -- part 64 (button)
  960. -- low flags: 00
  961. -- high flags: 0001
  962. -- rect: left=337 top=295 right=338 bottom=380
  963. -- title width / last selected line: 0
  964. -- icon id / first selected line: 0 / 0
  965. -- text alignment: 1
  966. -- font id: 0
  967. -- text size: 12
  968. -- style flags: 0
  969. -- line height: 16
  970. -- part name: New Button
  971.  
  972.  
  973. -- part 65 (button)
  974. -- low flags: 00
  975. -- high flags: 0000
  976. -- rect: left=379 top=295 right=338 bottom=422
  977. -- title width / last selected line: 0
  978. -- icon id / first selected line: 0 / 0
  979. -- text alignment: 1
  980. -- font id: 0
  981. -- text size: 12
  982. -- style flags: 0
  983. -- line height: 16
  984. -- part name: New Button
  985.  
  986.  
  987. -- part 66 (button)
  988. -- low flags: 00
  989. -- high flags: 0001
  990. -- rect: left=421 top=295 right=338 bottom=464
  991. -- title width / last selected line: 0
  992. -- icon id / first selected line: 0 / 0
  993. -- text alignment: 1
  994. -- font id: 0
  995. -- text size: 12
  996. -- style flags: 0
  997. -- line height: 16
  998. -- part name: New Button
  999.  
  1000.  
  1001. -- part 67 (field)
  1002. -- low flags: 01
  1003. -- high flags: 0004
  1004. -- rect: left=1 top=1 right=19 bottom=124
  1005. -- title width / last selected line: 0
  1006. -- icon id / first selected line: 0 / 0
  1007. -- text alignment: 0
  1008. -- font id: 3
  1009. -- text size: 9
  1010. -- style flags: 256
  1011. -- line height: 12
  1012. -- part name: Game Board
  1013.  
  1014.  
  1015. -- part 68 (button)
  1016. -- low flags: 80
  1017. -- high flags: A003
  1018. -- rect: left=29 top=306 right=318 bottom=96
  1019. -- title width / last selected line: 0
  1020. -- icon id / first selected line: 0 / 0
  1021. -- text alignment: 1
  1022. -- font id: 0
  1023. -- text size: 9
  1024. -- style flags: 0
  1025. -- line height: 12
  1026. -- part name: Save Board
  1027. ----- HyperTalk script -----
  1028. on mouseUp
  1029.   domenu "copy card"
  1030.   domenu "paste card"
  1031. end mouseUp
  1032.  
  1033.  
  1034.  
  1035. -- part 69 (button)
  1036. -- low flags: 00
  1037. -- high flags: A003
  1038. -- rect: left=27 top=305 right=318 bottom=99
  1039. -- title width / last selected line: 0
  1040. -- icon id / first selected line: 0 / 0
  1041. -- text alignment: 1
  1042. -- font id: 0
  1043. -- text size: 9
  1044. -- style flags: 0
  1045. -- line height: 12
  1046. -- part name: Reset Board
  1047. ----- HyperTalk script -----
  1048. on mouseUp
  1049.   answer "Reset the Board?" with "Cancel" or "Yes"
  1050.   if it is "yes"
  1051.   then
  1052.   answer "Want to Watch? (Slower)" with "No" or "Yes"
  1053.   if it is "No"
  1054.   then
  1055.   set lockscreen to true
  1056. else
  1057. end if
  1058. set the cursor to 4
  1059. put "Black" into field "end1"
  1060. put "White" into field "end2"
  1061. setLoc "black rook1",1
  1062. setLoc "black knight1",2
  1063. setLoc "black bishop1",3
  1064. setLoc "black queen",4
  1065. setLoc "black king",5
  1066. setLoc "black bishop2",6
  1067. setLoc "black knight2",7
  1068. setLoc "black rook2",8
  1069. repeat with x=1 to 8
  1070.   setLoc "black pawn" & x,8+x
  1071. end repeat
  1072. setLoc "white rook1",57
  1073. setLoc "white knight1",58
  1074. setLoc "white bishop1",59
  1075. setLoc "white queen",60
  1076. setLoc "white king",61
  1077. setLoc "white bishop2",62
  1078. setLoc "white knight2",63
  1079. setLoc "white rook2",64
  1080. repeat with x=1 to 8
  1081.   setLoc "white pawn" & x,48+x
  1082. end repeat
  1083. set the cursor to 1
  1084. else
  1085. end if
  1086. end mouseUp
  1087.  
  1088. on setLoc pieceLoc,buttonLoc
  1089.   set the loc of button pieceLoc to the loc of bkgnd button buttonLoc
  1090. end setloc
  1091.  
  1092.  
  1093.  
  1094. -- part 74 (field)
  1095. -- low flags: 01
  1096. -- high flags: 0004
  1097. -- rect: left=466 top=2 right=19 bottom=511
  1098. -- title width / last selected line: 0
  1099. -- icon id / first selected line: 0 / 0
  1100. -- text alignment: 1
  1101. -- font id: 3
  1102. -- text size: 9
  1103. -- style flags: 256
  1104. -- line height: 12
  1105. -- part name: End1
  1106.  
  1107.  
  1108. -- part 75 (field)
  1109. -- low flags: 01
  1110. -- high flags: 0004
  1111. -- rect: left=466 top=319 right=336 bottom=511
  1112. -- title width / last selected line: 0
  1113. -- icon id / first selected line: 0 / 0
  1114. -- text alignment: 1
  1115. -- font id: 3
  1116. -- text size: 9
  1117. -- style flags: 256
  1118. -- line height: 12
  1119. -- part name: End2
  1120.  
  1121.  
  1122. -- part 76 (button)
  1123. -- low flags: 80
  1124. -- high flags: A003
  1125. -- rect: left=30 top=288 right=301 bottom=96
  1126. -- title width / last selected line: 0
  1127. -- icon id / first selected line: 0 / 0
  1128. -- text alignment: 1
  1129. -- font id: 0
  1130. -- text size: 9
  1131. -- style flags: 0
  1132. -- line height: 12
  1133. -- part name: Swap Sides
  1134. ----- HyperTalk script -----
  1135. on mouseUp
  1136.   answer "Want to Watch? (Slower)" with "No" or "Yes"
  1137.   if it is "No"
  1138.   then
  1139.   set lockscreen to true
  1140. else
  1141. end if
  1142. set the cursor to 4
  1143. if field "end1" is "White"
  1144. then
  1145. put "Black" into field "End1"
  1146. put "White" into field "End2"
  1147. else
  1148.   put "White" into field "End1"
  1149.   put "Black" into field "End2"
  1150. end if
  1151. resetLoc "White Rook1"
  1152. resetLoc "White Rook2"
  1153. resetLoc "White Knight1"
  1154. resetLoc "White Knight2"
  1155. resetLoc "White Bishop1"
  1156. resetLoc "White Bishop2"
  1157. resetLoc "White Queen"
  1158. resetLoc "White King"
  1159. repeat with pawn = 1 to 8
  1160.   resetLoc "White Pawn" & pawn
  1161. end repeat
  1162. resetLoc "Black Rook1"
  1163. resetLoc "Black Rook2"
  1164. resetLoc "Black Knight1"
  1165. resetLoc "Black Knight2"
  1166. resetLoc "Black Bishop1"
  1167. resetLoc "Black Bishop2"
  1168. resetLoc "Black Queen"
  1169. resetLoc "Black King"
  1170. repeat with pawn = 1 to 8
  1171.   resetLoc "Black Pawn" & pawn
  1172. end repeat
  1173. set the cursor to 1
  1174. set lockscreen to false
  1175. end mouseUp
  1176.  
  1177. on resetLoc pieceName
  1178.   put item 1 of the loc of button pieceName into x
  1179.   put item 2 of the loc of button pieceName into y
  1180.  
  1181.   if x > 127 and x < 463
  1182.   then
  1183.   if x+294 > 442
  1184.   then
  1185.   put (x+294)-(2*(x+294-442)) into x
  1186. else
  1187.   put x+294 into x
  1188. end if
  1189.  
  1190. if y+294 > 316
  1191. then
  1192. put (y+294)-(2*(y+294-316)) into y
  1193. else
  1194.   put y+294 into y
  1195. end if
  1196. else
  1197. end if
  1198.  
  1199. set the loc of button pieceName to x,y
  1200. end resetLoc
  1201.  
  1202.  
  1203.  
  1204. -- part 78 (field)
  1205. -- low flags: 00
  1206. -- high flags: 0004
  1207. -- rect: left=3 top=28 right=47 bottom=125
  1208. -- title width / last selected line: 0
  1209. -- icon id / first selected line: 0 / 0
  1210. -- text alignment: 0
  1211. -- font id: 3
  1212. -- text size: 12
  1213. -- style flags: 0
  1214. -- line height: 16
  1215. -- part name: Game Info
  1216.  
  1217.  
  1218. -- part 79 (button)
  1219. -- low flags: 00
  1220. -- high flags: 0000
  1221. -- rect: left=474 top=293 right=318 bottom=501
  1222. -- title width / last selected line: 0
  1223. -- icon id / first selected line: 11045 / 11045
  1224. -- text alignment: 1
  1225. -- font id: 3
  1226. -- text size: 10
  1227. -- style flags: 0
  1228. -- line height: 13
  1229. -- part name: Home
  1230. ----- HyperTalk script -----
  1231. on mouseUp
  1232.   visual effect iris close
  1233.   go home
  1234. end mouseUp
  1235.  
  1236.